/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.srcptit.trainning.hanhpt.btvn1;

import java.util.Scanner;

/**
 *
 * @author Administrator
 */
public class Bai4M1 
{
    public static void main(String[] args)
    {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        lietkengto(n);
    }
    static boolean ngto(int n)
    {
        if(n==0||n==1) return false;
        else
            for(int i=2;i<= Math.sqrt(n);i++)
            if(n%i==0)
                return false;
                return true;
    }
    public static void lietkengto(int n)
    {
        int dem=0,i=2;
        System.out.println("n so nguyen to dau tien la ");
        while(dem<n)
        {
            if(ngto(i))
            {
                dem++;
                System.out.print( i+" ");
            }
            i++;
        }
        
                
    }
}
